package com.example.springbootdemo;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * spring boot 独立运行主类
 */
//使用controller需要指定responsebody("json")什么的，而使用restcontroller返回什么就是什么，比如返回user就是返回user这个json
@RestController
@SpringBootApplication
public class SpringbootDemoApplication {
	@RequestMapping("/hello")
	public String hello(){
		return"Hello world!";
	}
	public static void main(String[] args) {
		SpringApplication.run(SpringbootDemoApplication.class, args);
	}
}
